@import './theme/default';
@import './theme/font';

.zent-rate {
  color: $rate-star-color;
  color: var(--rate-star-color, $rate-star-color);
  display: inline-block;
  outline: none;
  font-size: $font-size-large;

  &-star {
    display: inline-block;
    margin-right: 9px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;

    &:hover {
      transform: scale(1.1);
    }

    &-first {
      position: absolute;
      left: 0;
      top: 0;
      width: 50%;
      height: 100%;
      overflow: hidden;
      opacity: 0;
    }

    &-zero {
      @include theme-color(color, stroke, 6);
    }

    &-half,
    &-part {
      .zent-rate-star-first {
        opacity: 1;
      }

      .zent-rate-star-second {
        @include theme-color(color, stroke, 6);
      }
    }

    .zent-rate-star-icon {
      font-size: 12px;
    }
  }

  &-disabled,
  &-readonly {
    .zent-rate-star {
      cursor: not-allowed;
      transition: none;

      &:hover {
        transform: scale(1);
      }
    }
  }

  &-readonly {
    .zent-rate-star {
      cursor: auto;
    }
  }
}
